<?php

/**
 * Configuracion form.
 *
 * @package    Sanitas
 * @subpackage form
 * @author     Jose Antonio Sánchez Bedoya
 * @version    SVN: $Id: sfDoctrineFormTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class ConfiguracionForm extends BaseConfiguracionForm
{
  public function configure()
  {
      $this->useFields(array('id','campo', 'valor'));
      // Debo deshabilitar este campo puesto que es que el que conecta con CrmContacto, por haber creado un formulario embebido.
      unset($this['empresa_id']);        
     
     //Following code will remove Required validators from these fields.
     unset($this->validatorSchema['created_at']);
     unset($this->validatorSchema['updated_at']);
     unset($this->validatorSchema['validated_at']);
     unset($this->validatorSchema['is_validated']);
     unset($this->validatorSchema['removed_at']);
     unset($this->validatorSchema['remove_it']); 

     //following code will remove fields from form
     unset($this->widgetSchema['created_at']);
     unset($this->widgetSchema['updated_at']);     
     unset($this->widgetSchema['validated_at']);
     unset($this->widgetSchema['is_validated']);
     unset($this->widgetSchema['removed_at']);
     unset($this->widgetSchema['remove_it']);
     
     $this->widgetSchema['campo'] = new sfWidgetFormInput(array(),array('readonly'=>'readonly'));
  }
}
